import {
  getAction,
  postAction,
  putAction,
  deleteAction,
} from "@/utils/httpUtils";

const api = {
  list: "/car_data/subsidy/getGuoMonthList",
  create: "/api/subsidies",
  update: "/api/subsidies",
  delete: "/api/subsidies",
};

export const getSubsidyList = (params) => {
  return getAction(api.list, params);
};

export const createSubsidy = (data) => {
  return postAction(api.create, data);
};

export const updateSubsidy = (id, data) => {
  return putAction(`${api.update}/${id}`, data);
};

export const deleteSubsidy = (id) => {
  return deleteAction(`${api.delete}/${id}`);
};
